local common = require("apigateway.common")
local client_ip = common.real_ip()
local ip = common.redis_config["ip"]
local port = common.redis_config["port"]

local function black_list()
	local result = common.has_black_list(ip,port,{client_ip})
	if  result ~= nil and result == 1 then
		ngx.exit(ngx.HTTP_UNAUTHORIZED)	
	end
end

local _M = {
	black_list = black_list
}
return _M
